{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Importing the dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "executionInfo": {
     "elapsed": 2818,
     "status": "ok",
     "timestamp": 1719646871627,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "h9SsdTPibCts"
   },
   "outputs": [],
   "source": [
    "from datasets import load_dataset\n",
    "emotions=load_dataset(\"emotion\",trust_remote_code=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Analyzing dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "id": "T6vn7YIkgA3j"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>text</th>\n",
       "      <th>label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>i didnt feel humiliated</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>i can go from feeling so hopeless to so damned...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>im grabbing a minute to post i feel greedy wrong</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>i am ever feeling nostalgic about the fireplac...</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>i am feeling grouchy</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                text  label\n",
       "0                            i didnt feel humiliated      0\n",
       "1  i can go from feeling so hopeless to so damned...      0\n",
       "2   im grabbing a minute to post i feel greedy wrong      3\n",
       "3  i am ever feeling nostalgic about the fireplac...      2\n",
       "4                               i am feeling grouchy      3"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "emotions.set_format(type=\"pandas\")\n",
    "df = emotions[\"train\"][:]\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Converting the integer labels to corresponding label names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "id": "EXx11liveXfu"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>text</th>\n",
       "      <th>label</th>\n",
       "      <th>label_name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>i didnt feel humiliated</td>\n",
       "      <td>0</td>\n",
       "      <td>sadness</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>i can go from feeling so hopeless to so damned...</td>\n",
       "      <td>0</td>\n",
       "      <td>sadness</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>im grabbing a minute to post i feel greedy wrong</td>\n",
       "      <td>3</td>\n",
       "      <td>anger</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>i am ever feeling nostalgic about the fireplac...</td>\n",
       "      <td>2</td>\n",
       "      <td>love</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>i am feeling grouchy</td>\n",
       "      <td>3</td>\n",
       "      <td>anger</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                text  label label_name\n",
       "0                            i didnt feel humiliated      0    sadness\n",
       "1  i can go from feeling so hopeless to so damned...      0    sadness\n",
       "2   im grabbing a minute to post i feel greedy wrong      3      anger\n",
       "3  i am ever feeling nostalgic about the fireplac...      2       love\n",
       "4                               i am feeling grouchy      3      anger"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def label_int2str(row):\n",
    "    return emotions[\"train\"].features[\"label\"].int2str(row)\n",
    "\n",
    "df[\"label_name\"] = df[\"label\"].apply(label_int2str)\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Analyzing distribution of labels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "id": "MPoolZ4NgHrk"
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEICAYAAABMGMOEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAYYklEQVR4nO3debhkVX3u8e9ry4w2owotsVUavCCC0KIYNI444ECUBHw0gnjFIXGIAyFXr1cj3qioETU+StSLoCIRJ66oiANoVIbTStMgYdC0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/a9rXAtsyf/r4DOAq4ra1vy/j2FQbh/8UkK5Ic2crm/XN53H8aZKxVVSUZq89FJ9kS+ATwsqr6+eCN5cC49beqbgX2SrIV8CngfqNt0cxI8iTgmqpakeQRI27ObNm/qtYkuRtwZpL/HN44X5/L4zjCWAPsNLR+z1Y2Lq5uw1Xa32ta+fr6PW8ejyQbMQiLj1TVJ1vx2PZ3naq6HvgqsB+D6Yh1b+SG2/7bfrXti4HrmB/9/XPgKUlWM5gifhRwHOPZVwCqak37ew2DNwP7MgbP5XEMjPOBZe0TGBszOGl22ojbNJ1OA9Z9WuIw4DND5c9un7h4CLC2DX/PAA5IsnX7VMYBrWxOaXPUHwAuqaq3D20a1/5u30YWJNkMeCyD8zZfBQ5uu03u77rH4WDgKzU4M3oacGj7ZNG9gWXAebPSiU5V9Y9Vdc+qWsrg/+NXquqZjGFfAZJskeQu65YZPAcvYhyey6M84z5TNwafOriMwZzwq0fdnj+hHycDVwE3M5i/fC6DudwvA5cDXwK2afsG+NfW51XA8qF6jmBwgvAK4Dmj7td6+ro/g3nfC4EL2u2JY9zfBwDfaf29CHhtK78PgxfBK4CPA5u08k3b+hVt+32G6np1exwuBZ4w6r5toN+P4HefkhrLvrZ+rWy3i9e9Bo3Dc9mfBpEkdRnHKSlJ0gwwMCRJXQwMSVIXA0OS1MXAkCR1MTAkSV0MDElSl/8Peqi5tVZ4GGAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "df[\"label_name\"].value_counts(ascending=True).plot.barh()\n",
    "plt.title(\"Frequency of Classes\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Drawing box plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "id": "J_gV0UAO1CGj"
   },
   "outputs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/yKwxj1U8F/g/wsSTPY2jnaujNF0Pv5hDggjb/sqr6AUBVXd0eB59csgrHs822AZ9lGPo4pYYfBQJ4L8Pw5Ffai/1mhiBZTL8BvD3JrcAvgT9qNVwE/IDhRIizfh94X5JiaM92VdXmJM8HPtSGsGAYuvgpcEqSXRl6/y9tl709yUFt2ZkMt+OkbK2duzEMJb2eYQh1e84HPsYw7HJSVW1sowbz3l9V/SLJkcDfJtmTIaffBYx17rFV+9HLJHcCbqyqSvIshoO1K+pTGz1KclfgK1W17VO1DvfthcBD5jGmKi2K9oK1rqpevNS1bM1K6tnvqIcCf9d6QtcBf7C05Wgu7S3tWcA7trPO44HjgHca9NL8rdqevSTpNivpAK0kaYEMe0nqgGEvSR0w7CWpA4a9JHXAsJekDvw/Nv+6XWHkM6oAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df[\"Words Per Tweet\"] = df[\"text\"].str.split().apply(len)\n",
    "df.boxplot(\"Words Per Tweet\", by=\"label_name\", grid=False, showfliers=False,\n",
    "           color=\"black\")\n",
    "plt.suptitle(\"\")\n",
    "plt.xlabel(\"\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### We had set output format to pandas, we reset it to default"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "id": "WwG4qnxc1dtT"
   },
   "outputs": [],
   "source": [
    "emotions.reset_format()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Importing the distilbert tokenizer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "id": "7ofq4Giy1ynl"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\USER\\anaconda3\\lib\\site-packages\\huggingface_hub\\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "# hide_output\n",
    "from transformers import AutoTokenizer\n",
    "\n",
    "model_ckpt = \"distilbert-base-uncased\"\n",
    "tokenizer = AutoTokenizer.from_pretrained(model_ckpt)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Tokenizing a sample text"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "id": "bGY1Gapd1z7t"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'input_ids': [101, 19204, 6026, 3793, 2003, 1037, 4563, 4708, 1997, 17953, 2361, 1012, 102], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\n"
     ]
    }
   ],
   "source": [
    "text=\"Tokenizing text is a core task of NLP.\"\n",
    "encoded_text = tokenizer(text)\n",
    "print(encoded_text)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Converting the tokens to its string equivalents"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "id": "SUs4FUil1008"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['[CLS]', 'token', '##izing', 'text', 'is', 'a', 'core', 'task', 'of', 'nl', '##p', '.', '[SEP]']\n"
     ]
    }
   ],
   "source": [
    "tokens = tokenizer.convert_ids_to_tokens(encoded_text.input_ids)\n",
    "print(tokens)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "id": "BuwUTKgp11aC",
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CLS] tokenizing text is a core task of nlp. [SEP]\n"
     ]
    }
   ],
   "source": [
    "print(tokenizer.convert_tokens_to_string(tokens))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Function to tokenize a batch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "id": "3q1nOqXG4dNQ"
   },
   "outputs": [],
   "source": [
    "def tokenize(batch):\n",
    "    return tokenizer(batch[\"text\"], padding=True, truncation=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "id": "gd7YSHFF6Dwl",
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'input_ids': [[101, 1045, 2134, 2102, 2514, 26608, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [101, 1045, 2064, 2175, 2013, 3110, 2061, 20625, 2000, 2061, 9636, 17772, 2074, 2013, 2108, 2105, 2619, 2040, 14977, 1998, 2003, 8300, 102]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}\n"
     ]
    }
   ],
   "source": [
    "print(tokenize(emotions[\"train\"][:2]))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Tabulating the special tokens in the tokenizer vocabulary"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "id": "f4aXjoq66QjT"
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Special Token</th>\n",
       "      <td>[PAD]</td>\n",
       "      <td>[UNK]</td>\n",
       "      <td>[CLS]</td>\n",
       "      <td>[SEP]</td>\n",
       "      <td>[MASK]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Token ID</th>\n",
       "      <td>0</td>\n",
       "      <td>100</td>\n",
       "      <td>101</td>\n",
       "      <td>102</td>\n",
       "      <td>103</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      0      1      2      3       4\n",
       "Special Token     [PAD]  [UNK]  [CLS]  [SEP]  [MASK]\n",
       "Special Token ID      0    100    101    102     103"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#hide_input\n",
    "tokens2ids = list(zip(tokenizer.all_special_tokens, tokenizer.all_special_ids))\n",
    "data = sorted(tokens2ids, key=lambda x : x[-1])\n",
    "df = pd.DataFrame(data, columns=[\"Special Token\", \"Special Token ID\"])\n",
    "df.T"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Tokenizing the entire dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "id": "NwtAiwg687WK",
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# hide_output\n",
    "emotions_encoded = emotions.map(tokenize, batched=True, batch_size=None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Extracting the last hidden state using the LLM and training a classifier using the extracted states"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Importing the model and testing with sample text"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\USER\\anaconda3\\lib\\site-packages\\huggingface_hub\\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "from transformers import DistilBertTokenizer, DistilBertModel\n",
    "tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')\n",
    "model = DistilBertModel.from_pretrained(\"distilbert-base-uncased\")\n",
    "text = \"Replace me by any text you'd like.\"\n",
    "encoded_input = tokenizer(text, return_tensors='pt')\n",
    "output = model(**encoded_input)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "id": "xZ2sxXpk9_Ed"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\USER\\anaconda3\\lib\\site-packages\\huggingface_hub\\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "from transformers import DistilBertModel\n",
    "import torch\n",
    "model_ckpt = \"distilbert-base-uncased\"\n",
    "device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
    "model = DistilBertModel.from_pretrained(model_ckpt).to(device)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "id": "bX18es-bif_x"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Input tensor shape: torch.Size([1, 6])\n"
     ]
    }
   ],
   "source": [
    "text = \"this is a test\"\n",
    "inputs = tokenizer(text, return_tensors=\"pt\")\n",
    "print(f\"Input tensor shape: {inputs['input_ids'].size()}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "id": "MNaV91zhi9Br"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'input_ids': tensor([[ 101, 2023, 2003, 1037, 3231,  102]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1]])}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "inputs"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Extracting the last hidden state"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "id": "V9HXQAUfi_ez",
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "BaseModelOutput(last_hidden_state=tensor([[[-0.1565, -0.1862,  0.0528,  ..., -0.1188,  0.0662,  0.5470],\n",
      "         [-0.3575, -0.6484, -0.0618,  ..., -0.3040,  0.3508,  0.5221],\n",
      "         [-0.2772, -0.4459,  0.1818,  ..., -0.0948, -0.0076,  0.9958],\n",
      "         [-0.2841, -0.3917,  0.3753,  ..., -0.2151, -0.1173,  1.0526],\n",
      "         [ 0.2661, -0.5094, -0.3180,  ..., -0.4203,  0.0144, -0.2149],\n",
      "         [ 0.9441,  0.0112, -0.4714,  ...,  0.1439, -0.7288, -0.1619]]],\n",
      "       device='cuda:0'), hidden_states=None, attentions=None)\n"
     ]
    }
   ],
   "source": [
    "inputs = {k:v.to(device) for k,v in inputs.items()}\n",
    "with torch.no_grad():\n",
    "    outputs = model(**inputs)\n",
    "print(outputs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "id": "zDPCrnBljIfg"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "torch.Size([1, 6, 768])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "outputs.last_hidden_state.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "id": "M8M6aOsokZk5"
   },
   "outputs": [],
   "source": [
    "device=\"cpu\"\n",
    "model.to(device)\n",
    "def extract_hidden_states(batch):\n",
    "    # Place model inputs on the GPU\n",
    "    inputs = {k:v.to(device) for k,v in batch.items()\n",
    "              if k in tokenizer.model_input_names}\n",
    "    # Extract last hidden states\n",
    "    with torch.no_grad():\n",
    "        last_hidden_state = model(**inputs).last_hidden_state\n",
    "    # Return vector for [CLS] token\n",
    "    return {\"hidden_state\": last_hidden_state[:,0].cpu().numpy()}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "executionInfo": {
     "elapsed": 1,
     "status": "ok",
     "timestamp": 1719646453536,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "LC9hNFC-mzns"
   },
   "outputs": [],
   "source": [
    "emotions_encoded.set_format(\"torch\",\n",
    "                            columns=[\"input_ids\", \"attention_mask\", \"label\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 284
    },
    "executionInfo": {
     "elapsed": 8231,
     "status": "error",
     "timestamp": 1719646462945,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "Dm8TeqZZnYe3",
    "outputId": "b308d5b8-3e89-4589-8fc5-adfeb4ccb7e5"
   },
   "outputs": [],
   "source": [
    "emotions_hidden = emotions_encoded.map(extract_hidden_states, batched=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "executionInfo": {
     "elapsed": 13,
     "status": "ok",
     "timestamp": 1719611099664,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "rpuhZunlnr6y",
    "outputId": "ae96df52-2d08-430b-ba30-c11ec810338c"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((16000, 768), (2000, 768))"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "X_train = np.array(emotions_hidden[\"train\"][\"hidden_state\"])\n",
    "X_valid = np.array(emotions_hidden[\"validation\"][\"hidden_state\"])\n",
    "y_train = np.array(emotions_hidden[\"train\"][\"label\"])\n",
    "y_valid = np.array(emotions_hidden[\"validation\"][\"label\"])\n",
    "X_train.shape, X_valid.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Finetuning for Classification"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Loading the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "colab": {
     "background_save": true,
     "base_uri": "https://localhost:8080/"
    },
    "executionInfo": {
     "elapsed": 621,
     "status": "ok",
     "timestamp": 1719646469396,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "lVGoThSypjH_"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Some weights of DistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['classifier.bias', 'classifier.weight', 'pre_classifier.bias', 'pre_classifier.weight']\n",
      "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
     ]
    }
   ],
   "source": [
    "from transformers import AutoModelForSequenceClassification\n",
    "import torch\n",
    "\n",
    "device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
    "num_labels = 6\n",
    "model = (AutoModelForSequenceClassification.from_pretrained(model_ckpt, num_labels=num_labels).to(device))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Defining performance metrics: accuracy and f1 score for classification"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "colab": {
     "background_save": true
    },
    "executionInfo": {
     "elapsed": 1149,
     "status": "ok",
     "timestamp": 1719646472486,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "8d1_KY7hvVFS"
   },
   "outputs": [],
   "source": [
    "from sklearn.metrics import accuracy_score, f1_score\n",
    "\n",
    "def compute_metrics(pred):\n",
    "    labels = pred.label_ids\n",
    "    preds = pred.predictions.argmax(-1)\n",
    "    f1 = f1_score(labels, preds, average=\"weighted\")\n",
    "    acc = accuracy_score(labels, preds)\n",
    "    return {\"accuracy\": acc, \"f1\": f1}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Defining training arguments"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 563
    },
    "executionInfo": {
     "elapsed": 5,
     "status": "error",
     "timestamp": 1719646633134,
     "user": {
      "displayName": "Parthiv Aneesh",
      "userId": "17652763849723759531"
     },
     "user_tz": -330
    },
    "id": "SSHqxN93vUrr",
    "outputId": "f16d4f6c-d181-44a2-9d94-0801e0ad486e"
   },
   "outputs": [],
   "source": [
    "from transformers import Trainer, TrainingArguments\n",
    "\n",
    "batch_size = 64\n",
    "logging_steps = len(emotions_encoded[\"train\"]) // batch_size\n",
    "model_name = f\"{model_ckpt}-finetuned-emotion\"\n",
    "training_args = TrainingArguments(output_dir=model_name,\n",
    "                                  num_train_epochs=2,\n",
    "                                  learning_rate=2e-5,\n",
    "                                  per_device_train_batch_size=batch_size,\n",
    "                                  per_device_eval_batch_size=batch_size,\n",
    "                                  weight_decay=0.01,\n",
    "                                  evaluation_strategy=\"epoch\",\n",
    "                                  disable_tqdm=False,\n",
    "                                  logging_steps=logging_steps,\n",
    "                                  push_to_hub=True,\n",
    "                                  log_level=\"error\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "368c6cc9db0d44a5a597c1075cda8382",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from huggingface_hub import notebook_login\n",
    "\n",
    "notebook_login()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Training the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\USER\\anaconda3\\lib\\site-packages\\accelerate\\accelerator.py:444: FutureWarning: Passing the following arguments to `Accelerator` is deprecated and will be removed in version 1.0 of Accelerate: dict_keys(['dispatch_batches', 'split_batches', 'even_batches', 'use_seedable_sampler']). Please pass an `accelerate.DataLoaderConfiguration` instead: \n",
      "dataloader_config = DataLoaderConfiguration(dispatch_batches=None, split_batches=False, even_batches=True, use_seedable_sampler=True)\n",
      "  warnings.warn(\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "      \n",
       "      <progress value='500' max='500' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      [500/500 12:19, Epoch 2/2]\n",
       "    </div>\n",
       "    <table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       " <tr style=\"text-align: left;\">\n",
       "      <th>Epoch</th>\n",
       "      <th>Training Loss</th>\n",
       "      <th>Validation Loss</th>\n",
       "      <th>Accuracy</th>\n",
       "      <th>F1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>0.875300</td>\n",
       "      <td>0.336944</td>\n",
       "      <td>0.903000</td>\n",
       "      <td>0.901638</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>0.263800</td>\n",
       "      <td>0.222950</td>\n",
       "      <td>0.928500</td>\n",
       "      <td>0.928421</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table><p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from transformers import Trainer\n",
    "\n",
    "trainer = Trainer(model=model, args=training_args,\n",
    "                  compute_metrics=compute_metrics,\n",
    "                  train_dataset=emotions_encoded[\"train\"],\n",
    "                  eval_dataset=emotions_encoded[\"validation\"],\n",
    "                  tokenizer=tokenizer)\n",
    "trainer.train();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Obtaining and analyzing prediction outputs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "id": "rS7v8NNR35T3"
   },
   "outputs": [
    {
     "data": {
      "text/html": [],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "preds_output = trainer.predict(emotions_encoded[\"validation\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'test_loss': 0.22294998168945312,\n",
       " 'test_accuracy': 0.9285,\n",
       " 'test_f1': 0.9284205859029458,\n",
       " 'test_runtime': 8.9302,\n",
       " 'test_samples_per_second': 223.959,\n",
       " 'test_steps_per_second': 3.583}"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "preds_output.metrics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "y_preds = np.argmax(preds_output.predictions, axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      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ire1pK4jIUrGe6vsx1o9RsyWZPAnYa9zr9vBv7F/xX3wa8Ff2NKvtX8crlSX9HYlSmbB7Hp249BiUGKChMWaPfTBONsZcbT+B4HsRWQo0xXogXgOspwbvACalm2848BHWU6H3iEh5Y8xxsR6HftoYc/G/CPgU67c334lIJNbjP+oDI4HvjDFjxHqk/T9ykM599jJKAetFZLb9TLYgrCfhPiYiI+x5P4j1xN9BxphfxHqW23tYDyNVKlNaSJTyVUqsJ6KC1SOZiHXJyfspsR2Axhfvf2A9y6k21jO5phtj3MBBEVmeyfxbYj01eA+AMeZ4FnHcBDSwH00CECzWM69igZ72tAtF5EQOcnpYRG61X198EvAxrEePf24PnwrMsZdxLTDTa9klUCobWkiU8nXWGBPtPcA+oHo/nynTp/2KSOdcjCMA6/+X8H5SLV4H9xyRrJ8EnBljL/dk+s9AqezoPRKl/rqsnva7iktPDY4A2mUy7VogVkSusKctbw//Ayjr1W4p8NDFNyISbb9cBfSzh3UCyl0m1uyeBByA/bRqe57fGWNOAXtE5HZ7GSIiTS6zDPU/TguJUn/dx1j3P+JFZBvwAVbvfi7wiz1uMrAm/YTGmCSs/1Fxjlj/8dTFS0tfArdevNkOPAw0t2/m7+DSt8dGYxWi7ViXuPZdJtavAJdYTwJ+Gd8nAZ8BrrFzuAEYYw+/E/iHHd92QB/gqLKlz9pSSinliPZIlFJKOaKFRCmllCNaSJRSSjmihUQppZQjWkiUUko5ooVEKaWUI1pIlFJKOaKFRCmllCP/D8uLuZuG32c5AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x432 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix\n",
    "y_valid = np.array(emotions_hidden[\"validation\"][\"label\"])\n",
    "labels = emotions[\"train\"].features[\"label\"].names\n",
    "def plot_confusion_matrix(y_preds, y_true, labels):\n",
    "    cm = confusion_matrix(y_true, y_preds, normalize=\"true\")\n",
    "    fig, ax = plt.subplots(figsize=(6, 6))\n",
    "    disp = ConfusionMatrixDisplay(confusion_matrix=cm, display_labels=labels)\n",
    "    disp.plot(cmap=\"Blues\", values_format=\".2f\", ax=ax, colorbar=False)\n",
    "    plt.title(\"Normalized confusion matrix\")\n",
    "    plt.show()\n",
    "plot_confusion_matrix(y_preds, y_valid, labels)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Error Analysis"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Pass labels during forward pass to get loss values too"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "from torch.nn.functional import cross_entropy\n",
    "\n",
    "def forward_pass_with_label(batch):\n",
    "    # Place all input tensors on the same device as the model\n",
    "    inputs = {k:v.to(device) for k,v in batch.items() \n",
    "              if k in tokenizer.model_input_names}\n",
    "\n",
    "    with torch.no_grad():\n",
    "        output = model(**inputs)\n",
    "        pred_label = torch.argmax(output.logits, axis=-1)\n",
    "        loss = cross_entropy(output.logits, batch[\"label\"].to(device), \n",
    "                             reduction=\"none\")\n",
    "\n",
    "    # Place outputs on CPU for compatibility with other dataset columns   \n",
    "    return {\"loss\": loss.cpu().numpy(), \n",
    "            \"predicted_label\": pred_label.cpu().numpy()}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Get losses on all predictions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "13e7e61f86ef4c8b8543fbc90de6e57d",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Map:   0%|          | 0/2000 [00:00<?, ? examples/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#hide_output\n",
    "# Convert our dataset back to PyTorch tensors\n",
    "emotions_encoded.set_format(\"torch\", columns=[\"input_ids\", \"attention_mask\", \"label\"])\n",
    "# Compute loss values\n",
    "emotions_encoded[\"validation\"] = emotions_encoded[\"validation\"].map(\n",
    "    forward_pass_with_label, batched=True, batch_size=16)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dataset({\n",
       "    features: ['text', 'label', 'input_ids', 'attention_mask', 'loss', 'predicted_label'],\n",
       "    num_rows: 2000\n",
       "})"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "emotions_encoded[\"validation\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "emotions_encoded.set_format(\"pandas\")\n",
    "cols = [\"text\", \"label\", \"predicted_label\", \"loss\"]\n",
    "df_test = emotions_encoded[\"validation\"][:][cols]\n",
    "df_test[\"label\"] = df_test[\"label\"].apply(label_int2str)\n",
    "df_test[\"predicted_label\"] = (df_test[\"predicted_label\"]\n",
    "                              .apply(label_int2str))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Analyze predictions with highest loss"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>text</th>\n",
       "      <th>label</th>\n",
       "      <th>predicted_label</th>\n",
       "      <th>loss</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1963</th>\n",
       "      <td>i called myself pro life and voted for perry w...</td>\n",
       "      <td>joy</td>\n",
       "      <td>sadness</td>\n",
       "      <td>5.415555</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>465</th>\n",
       "      <td>i would eventually go in to these stores but i...</td>\n",
       "      <td>joy</td>\n",
       "      <td>fear</td>\n",
       "      <td>5.188050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1870</th>\n",
       "      <td>i guess i feel betrayed because i admired him ...</td>\n",
       "      <td>joy</td>\n",
       "      <td>sadness</td>\n",
       "      <td>5.130027</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1500</th>\n",
       "      <td>i guess we would naturally feel a sense of lon...</td>\n",
       "      <td>anger</td>\n",
       "      <td>sadness</td>\n",
       "      <td>5.043313</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1274</th>\n",
       "      <td>i am going to several holiday parties and i ca...</td>\n",
       "      <td>joy</td>\n",
       "      <td>sadness</td>\n",
       "      <td>5.009690</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>765</th>\n",
       "      <td>i feel super awkward and out of place right now</td>\n",
       "      <td>joy</td>\n",
       "      <td>sadness</td>\n",
       "      <td>4.982485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>882</th>\n",
       "      <td>i feel badly about reneging on my commitment t...</td>\n",
       "      <td>love</td>\n",
       "      <td>sadness</td>\n",
       "      <td>4.950666</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>im lazy my characters fall into categories of ...</td>\n",
       "      <td>joy</td>\n",
       "      <td>fear</td>\n",
       "      <td>4.743366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1950</th>\n",
       "      <td>i as representative of everything thats wrong ...</td>\n",
       "      <td>surprise</td>\n",
       "      <td>sadness</td>\n",
       "      <td>4.656949</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1801</th>\n",
       "      <td>i feel that he was being overshadowed by the s...</td>\n",
       "      <td>love</td>\n",
       "      <td>sadness</td>\n",
       "      <td>4.441727</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1836</th>\n",
       "      <td>i got a very nasty electrical shock when i was...</td>\n",
       "      <td>fear</td>\n",
       "      <td>anger</td>\n",
       "      <td>4.140874</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>318</th>\n",
       "      <td>i felt ashamed of these feelings and was scare...</td>\n",
       "      <td>fear</td>\n",
       "      <td>sadness</td>\n",
       "      <td>4.132989</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1590</th>\n",
       "      <td>deception from a person i loved very much</td>\n",
       "      <td>anger</td>\n",
       "      <td>love</td>\n",
       "      <td>4.034566</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1683</th>\n",
       "      <td>i had applied for a job and they had assured m...</td>\n",
       "      <td>anger</td>\n",
       "      <td>joy</td>\n",
       "      <td>3.938872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1509</th>\n",
       "      <td>i guess this is a memoir so it feels like that...</td>\n",
       "      <td>joy</td>\n",
       "      <td>fear</td>\n",
       "      <td>3.877358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <td>i feel vaguely cheated and a little amused</td>\n",
       "      <td>joy</td>\n",
       "      <td>anger</td>\n",
       "      <td>3.873873</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1367</th>\n",
       "      <td>that day i was alone at home after coming home...</td>\n",
       "      <td>fear</td>\n",
       "      <td>sadness</td>\n",
       "      <td>3.852012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>259</th>\n",
       "      <td>when i noticed two spiders running on the floo...</td>\n",
       "      <td>anger</td>\n",
       "      <td>fear</td>\n",
       "      <td>3.612118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>160</th>\n",
       "      <td>i didnt want to feel outcasted as the uptight ...</td>\n",
       "      <td>fear</td>\n",
       "      <td>sadness</td>\n",
       "      <td>3.421460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1852</th>\n",
       "      <td>i arrived home with a strange feeling of happi...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>fear</td>\n",
       "      <td>3.360646</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>860</th>\n",
       "      <td>i first had cordelia i didnt feel a strong urg...</td>\n",
       "      <td>joy</td>\n",
       "      <td>surprise</td>\n",
       "      <td>3.350421</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1122</th>\n",
       "      <td>i feel so amazing about taking this trip as i ...</td>\n",
       "      <td>surprise</td>\n",
       "      <td>joy</td>\n",
       "      <td>3.301214</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1919</th>\n",
       "      <td>i should admit when consuming alcohol myself i...</td>\n",
       "      <td>fear</td>\n",
       "      <td>sadness</td>\n",
       "      <td>3.279891</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>746</th>\n",
       "      <td>i feel they are amazing unique people and i lo...</td>\n",
       "      <td>surprise</td>\n",
       "      <td>joy</td>\n",
       "      <td>3.155161</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1230</th>\n",
       "      <td>i don t always feel like i have amazing style ...</td>\n",
       "      <td>surprise</td>\n",
       "      <td>joy</td>\n",
       "      <td>3.131077</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1816</th>\n",
       "      <td>i am feeling overwhelmed i dont feel hopeless ...</td>\n",
       "      <td>surprise</td>\n",
       "      <td>fear</td>\n",
       "      <td>3.004403</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1233</th>\n",
       "      <td>i feel like the little dorky nerdy kid sitting...</td>\n",
       "      <td>joy</td>\n",
       "      <td>sadness</td>\n",
       "      <td>2.972802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1857</th>\n",
       "      <td>im going to be very honest with you it feels a...</td>\n",
       "      <td>surprise</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.911266</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1065</th>\n",
       "      <td>i know have no problem meeting new people and ...</td>\n",
       "      <td>love</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.883659</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1808</th>\n",
       "      <td>i could feel the depth and richness of the hot...</td>\n",
       "      <td>love</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.800892</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>300</th>\n",
       "      <td>i have had several new members tell me how com...</td>\n",
       "      <td>love</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.777465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>292</th>\n",
       "      <td>i can say is that i feel like myself when i pu...</td>\n",
       "      <td>love</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.751575</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>986</th>\n",
       "      <td>i am feeling amazing</td>\n",
       "      <td>surprise</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.751537</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>312</th>\n",
       "      <td>i like the domestic scene salty sweet combos r...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.741482</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1156</th>\n",
       "      <td>i worked as an editor and part of my job was t...</td>\n",
       "      <td>love</td>\n",
       "      <td>sadness</td>\n",
       "      <td>2.626048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>145</th>\n",
       "      <td>i will never forget as he shot the dye into me...</td>\n",
       "      <td>love</td>\n",
       "      <td>anger</td>\n",
       "      <td>2.607978</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>495</th>\n",
       "      <td>i feel so squeezed hate this feeling thats why...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>love</td>\n",
       "      <td>2.605322</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>i feel gracious what about you</td>\n",
       "      <td>love</td>\n",
       "      <td>joy</td>\n",
       "      <td>2.551414</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1552</th>\n",
       "      <td>i hope that they can tell a difference and tha...</td>\n",
       "      <td>anger</td>\n",
       "      <td>fear</td>\n",
       "      <td>2.444345</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>481</th>\n",
       "      <td>i feel hated there but had to remind my selfis...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>anger</td>\n",
       "      <td>2.419510</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                   text     label  \\\n",
       "1963  i called myself pro life and voted for perry w...       joy   \n",
       "465   i would eventually go in to these stores but i...       joy   \n",
       "1870  i guess i feel betrayed because i admired him ...       joy   \n",
       "1500  i guess we would naturally feel a sense of lon...     anger   \n",
       "1274  i am going to several holiday parties and i ca...       joy   \n",
       "765     i feel super awkward and out of place right now       joy   \n",
       "882   i feel badly about reneging on my commitment t...      love   \n",
       "1111  im lazy my characters fall into categories of ...       joy   \n",
       "1950  i as representative of everything thats wrong ...  surprise   \n",
       "1801  i feel that he was being overshadowed by the s...      love   \n",
       "1836  i got a very nasty electrical shock when i was...      fear   \n",
       "318   i felt ashamed of these feelings and was scare...      fear   \n",
       "1590          deception from a person i loved very much     anger   \n",
       "1683  i had applied for a job and they had assured m...     anger   \n",
       "1509  i guess this is a memoir so it feels like that...       joy   \n",
       "1964         i feel vaguely cheated and a little amused       joy   \n",
       "1367  that day i was alone at home after coming home...      fear   \n",
       "259   when i noticed two spiders running on the floo...     anger   \n",
       "160   i didnt want to feel outcasted as the uptight ...      fear   \n",
       "1852  i arrived home with a strange feeling of happi...   sadness   \n",
       "860   i first had cordelia i didnt feel a strong urg...       joy   \n",
       "1122  i feel so amazing about taking this trip as i ...  surprise   \n",
       "1919  i should admit when consuming alcohol myself i...      fear   \n",
       "746   i feel they are amazing unique people and i lo...  surprise   \n",
       "1230  i don t always feel like i have amazing style ...  surprise   \n",
       "1816  i am feeling overwhelmed i dont feel hopeless ...  surprise   \n",
       "1233  i feel like the little dorky nerdy kid sitting...       joy   \n",
       "1857  im going to be very honest with you it feels a...  surprise   \n",
       "1065  i know have no problem meeting new people and ...      love   \n",
       "1808  i could feel the depth and richness of the hot...      love   \n",
       "300   i have had several new members tell me how com...      love   \n",
       "292   i can say is that i feel like myself when i pu...      love   \n",
       "986                                i am feeling amazing  surprise   \n",
       "312   i like the domestic scene salty sweet combos r...   sadness   \n",
       "1156  i worked as an editor and part of my job was t...      love   \n",
       "145   i will never forget as he shot the dye into me...      love   \n",
       "495   i feel so squeezed hate this feeling thats why...   sadness   \n",
       "1112                     i feel gracious what about you      love   \n",
       "1552  i hope that they can tell a difference and tha...     anger   \n",
       "481   i feel hated there but had to remind my selfis...   sadness   \n",
       "\n",
       "     predicted_label      loss  \n",
       "1963         sadness  5.415555  \n",
       "465             fear  5.188050  \n",
       "1870         sadness  5.130027  \n",
       "1500         sadness  5.043313  \n",
       "1274         sadness  5.009690  \n",
       "765          sadness  4.982485  \n",
       "882          sadness  4.950666  \n",
       "1111            fear  4.743366  \n",
       "1950         sadness  4.656949  \n",
       "1801         sadness  4.441727  \n",
       "1836           anger  4.140874  \n",
       "318          sadness  4.132989  \n",
       "1590            love  4.034566  \n",
       "1683             joy  3.938872  \n",
       "1509            fear  3.877358  \n",
       "1964           anger  3.873873  \n",
       "1367         sadness  3.852012  \n",
       "259             fear  3.612118  \n",
       "160          sadness  3.421460  \n",
       "1852            fear  3.360646  \n",
       "860         surprise  3.350421  \n",
       "1122             joy  3.301214  \n",
       "1919         sadness  3.279891  \n",
       "746              joy  3.155161  \n",
       "1230             joy  3.131077  \n",
       "1816            fear  3.004403  \n",
       "1233         sadness  2.972802  \n",
       "1857             joy  2.911266  \n",
       "1065             joy  2.883659  \n",
       "1808             joy  2.800892  \n",
       "300              joy  2.777465  \n",
       "292              joy  2.751575  \n",
       "986              joy  2.751537  \n",
       "312              joy  2.741482  \n",
       "1156         sadness  2.626048  \n",
       "145            anger  2.607978  \n",
       "495             love  2.605322  \n",
       "1112             joy  2.551414  \n",
       "1552            fear  2.444345  \n",
       "481            anger  2.419510  "
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#hide_output\n",
    "df_test.sort_values(\"loss\", ascending=False).head(40)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We notice that the highest losses are those for which labels are confused for sadness"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Analyze predictions with lowest losses"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>text</th>\n",
       "      <th>label</th>\n",
       "      <th>predicted_label</th>\n",
       "      <th>loss</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>566</th>\n",
       "      <td>i did things that i always wondered about and ...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.019758</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>i have no extra money im worried all of the ti...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.019787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1861</th>\n",
       "      <td>im tired of feeling lethargic hating to work o...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.019987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1303</th>\n",
       "      <td>i feel pathetic and uninspired</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>i feel that i m so pathetic and downright dumb...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020055</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1152</th>\n",
       "      <td>i feel pathetic because i shouldn t complain a...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020189</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1140</th>\n",
       "      <td>i do think about certain people i feel a bit d...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020191</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>131</th>\n",
       "      <td>i feel like a graph doesnt show the data accur...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>961</th>\n",
       "      <td>i really didnt feel like going out at all but ...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1452</th>\n",
       "      <td>i always feel guilty and come to one conclusio...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1601</th>\n",
       "      <td>i feel so ungrateful when thinking saying thes...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020346</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>869</th>\n",
       "      <td>i dont have training to count on to see the gi...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1965</th>\n",
       "      <td>i started feeling pathetic and ashamed</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1502</th>\n",
       "      <td>i feel ungrateful for stupid shit like</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020368</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>355</th>\n",
       "      <td>i ever feel ugly or ashamed of my body</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020392</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1523</th>\n",
       "      <td>i dont give a fuck because i feel like i canno...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020407</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1466</th>\n",
       "      <td>i feel so ungrateful to be wishing this pregna...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>267</th>\n",
       "      <td>i feel like im alone in missing him and becaus...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>277</th>\n",
       "      <td>i just feel like if i can just make it through...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020454</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>564</th>\n",
       "      <td>i feel like i m just a good actress then maybe</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020507</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>396</th>\n",
       "      <td>i feel pretty pathetic now</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020520</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>244</th>\n",
       "      <td>im kinda relieve but at the same time i feel d...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020598</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>189</th>\n",
       "      <td>i leave the meeting feeling more than a little...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>i woke up often got up around am feeling pukey...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1531</th>\n",
       "      <td>i forgive stanley hes not so quick to forgive ...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>i feel try to tell me im ungrateful tell me im...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1656</th>\n",
       "      <td>im feeling very jaded and uncertain about love...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020773</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1510</th>\n",
       "      <td>i feel so beaten down and defeated</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020816</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>875</th>\n",
       "      <td>im feeling especially festive since i am wait ...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020835</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1873</th>\n",
       "      <td>i feel practically virtuous this month i have ...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020842</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>392</th>\n",
       "      <td>i remember feeling disheartened one day when w...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1548</th>\n",
       "      <td>im not feeling very festive this year</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020901</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1984</th>\n",
       "      <td>i have i feel pathetic for lying if i say no</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020930</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>802</th>\n",
       "      <td>i hate hate hate watching people work and me s...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.020962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1310</th>\n",
       "      <td>i feel like an ungrateful asshole</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.020972</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>257</th>\n",
       "      <td>im feeling very remorseful at the moment</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.021027</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>697</th>\n",
       "      <td>i was missing him desperately and feeling idio...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.021050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>394</th>\n",
       "      <td>i feel shamed that i hoped for one last christ...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.021058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1147</th>\n",
       "      <td>i type i feel bouncy and excited to get out my...</td>\n",
       "      <td>joy</td>\n",
       "      <td>joy</td>\n",
       "      <td>0.021132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1368</th>\n",
       "      <td>i started this blog with pure intentions i mus...</td>\n",
       "      <td>sadness</td>\n",
       "      <td>sadness</td>\n",
       "      <td>0.021153</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                   text    label  \\\n",
       "566   i did things that i always wondered about and ...  sadness   \n",
       "69    i have no extra money im worried all of the ti...  sadness   \n",
       "1861  im tired of feeling lethargic hating to work o...  sadness   \n",
       "1303                     i feel pathetic and uninspired  sadness   \n",
       "34    i feel that i m so pathetic and downright dumb...  sadness   \n",
       "1152  i feel pathetic because i shouldn t complain a...  sadness   \n",
       "1140  i do think about certain people i feel a bit d...  sadness   \n",
       "131   i feel like a graph doesnt show the data accur...      joy   \n",
       "961   i really didnt feel like going out at all but ...      joy   \n",
       "1452  i always feel guilty and come to one conclusio...  sadness   \n",
       "1601  i feel so ungrateful when thinking saying thes...  sadness   \n",
       "869   i dont have training to count on to see the gi...  sadness   \n",
       "1965             i started feeling pathetic and ashamed  sadness   \n",
       "1502             i feel ungrateful for stupid shit like  sadness   \n",
       "355              i ever feel ugly or ashamed of my body  sadness   \n",
       "1523  i dont give a fuck because i feel like i canno...      joy   \n",
       "1466  i feel so ungrateful to be wishing this pregna...  sadness   \n",
       "267   i feel like im alone in missing him and becaus...  sadness   \n",
       "277   i just feel like if i can just make it through...      joy   \n",
       "564      i feel like i m just a good actress then maybe      joy   \n",
       "396                          i feel pretty pathetic now  sadness   \n",
       "244   im kinda relieve but at the same time i feel d...  sadness   \n",
       "189   i leave the meeting feeling more than a little...  sadness   \n",
       "12    i woke up often got up around am feeling pukey...  sadness   \n",
       "1531  i forgive stanley hes not so quick to forgive ...  sadness   \n",
       "21    i feel try to tell me im ungrateful tell me im...  sadness   \n",
       "1656  im feeling very jaded and uncertain about love...  sadness   \n",
       "1510                 i feel so beaten down and defeated  sadness   \n",
       "875   im feeling especially festive since i am wait ...      joy   \n",
       "1873  i feel practically virtuous this month i have ...      joy   \n",
       "392   i remember feeling disheartened one day when w...  sadness   \n",
       "1548              im not feeling very festive this year      joy   \n",
       "1984       i have i feel pathetic for lying if i say no  sadness   \n",
       "802   i hate hate hate watching people work and me s...      joy   \n",
       "1310                  i feel like an ungrateful asshole  sadness   \n",
       "257            im feeling very remorseful at the moment  sadness   \n",
       "697   i was missing him desperately and feeling idio...  sadness   \n",
       "394   i feel shamed that i hoped for one last christ...  sadness   \n",
       "1147  i type i feel bouncy and excited to get out my...      joy   \n",
       "1368  i started this blog with pure intentions i mus...  sadness   \n",
       "\n",
       "     predicted_label      loss  \n",
       "566          sadness  0.019758  \n",
       "69           sadness  0.019787  \n",
       "1861         sadness  0.019987  \n",
       "1303         sadness  0.020054  \n",
       "34           sadness  0.020055  \n",
       "1152         sadness  0.020189  \n",
       "1140         sadness  0.020191  \n",
       "131              joy  0.020215  \n",
       "961              joy  0.020257  \n",
       "1452         sadness  0.020283  \n",
       "1601         sadness  0.020346  \n",
       "869          sadness  0.020363  \n",
       "1965         sadness  0.020364  \n",
       "1502         sadness  0.020368  \n",
       "355          sadness  0.020392  \n",
       "1523             joy  0.020407  \n",
       "1466         sadness  0.020426  \n",
       "267          sadness  0.020440  \n",
       "277              joy  0.020454  \n",
       "564              joy  0.020507  \n",
       "396          sadness  0.020520  \n",
       "244          sadness  0.020598  \n",
       "189          sadness  0.020618  \n",
       "12           sadness  0.020702  \n",
       "1531         sadness  0.020743  \n",
       "21           sadness  0.020770  \n",
       "1656         sadness  0.020773  \n",
       "1510         sadness  0.020816  \n",
       "875              joy  0.020835  \n",
       "1873             joy  0.020842  \n",
       "392          sadness  0.020860  \n",
       "1548             joy  0.020901  \n",
       "1984         sadness  0.020930  \n",
       "802              joy  0.020962  \n",
       "1310         sadness  0.020972  \n",
       "257          sadness  0.021027  \n",
       "697          sadness  0.021050  \n",
       "394          sadness  0.021058  \n",
       "1147             joy  0.021132  \n",
       "1368         sadness  0.021153  "
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#hide_output\n",
    "df_test.sort_values(\"loss\", ascending=True).head(40)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We notice that the model is most confident while predicting the class sadness"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "accelerator": "TPU",
  "colab": {
   "authorship_tag": "ABX9TyMirUXNvMVIn3pwh4N6Y3Xd",
   "gpuType": "V28",
   "name": "",
   "version": ""
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "0c62e284bb884fa0ad3b2325d5df4533": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_7aac3c1885f645c6a807bc02cc113963",
       "IPY_MODEL_b2fd0a70566b4acb809c4fb46a46adde",
       "IPY_MODEL_601474264249475aa9321b892249aad4"
      ],
      "layout": "IPY_MODEL_8b47f58e949f4c80b752a585ff7c2b08"
     }
    },
    "601474264249475aa9321b892249aad4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_9d3285e1f6474b50b6cd4de11ba53bfc",
      "placeholder": "​",
      "style": "IPY_MODEL_fa432e0d88b44c4cbec7c8c90f9f0339",
      "value": " 2000/16000 [00:06&lt;00:29, 477.06 examples/s]"
     }
    },
    "7aac3c1885f645c6a807bc02cc113963": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_7ae891bb3617444998c1a5f304d5b5e9",
      "placeholder": "​",
      "style": "IPY_MODEL_fb23062557514a929e0e93dbe95e168b",
      "value": "Map:  12%"
     }
    },
    "7ae891bb3617444998c1a5f304d5b5e9": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "8b47f58e949f4c80b752a585ff7c2b08": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "98e24e421155425dab011e2a06735b40": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "9d3285e1f6474b50b6cd4de11ba53bfc": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "b2fd0a70566b4acb809c4fb46a46adde": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "danger",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_98e24e421155425dab011e2a06735b40",
      "max": 16000,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_f1b034aa3baa4b368dcb1ead0b8d3eaf",
      "value": 2000
     }
    },
    "f1b034aa3baa4b368dcb1ead0b8d3eaf": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "fa432e0d88b44c4cbec7c8c90f9f0339": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "fb23062557514a929e0e93dbe95e168b": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
